package com.skylin.mysell.util;

import com.skylin.mysell.VO.ResultVO;

/**
 * @author quanlinlin on 2018/12/18 21:02.
 * @version 1.0
 */
public class ResultVOUtil {

    public static ResultVO success() {
        return success(null);
    }

    public static ResultVO success(Object o) {
        ResultVO<Object> objectResultVO = new ResultVO<>();
        objectResultVO.setCode(0);
        objectResultVO.setMessage("成功");
        objectResultVO.setData(o);
        return objectResultVO;
    }

    public static ResultVO error(Integer code, String msg) {
        ResultVO<Object> objectResultVO = new ResultVO<>();
        objectResultVO.setCode(code);
        objectResultVO.setMessage(msg);
        return objectResultVO;
    }

}
